//
//  CPTestNet.m
//  News
//
//  Created by chen on 15/3/24.
//  Copyright (c) 2015年 chen. All rights reserved.
//

#import <UIKit/UIKit.h>
#import <XCTest/XCTest.h>
#import "CPNetwork.h"

@interface CPTestNet : XCTestCase

@end

@implementation CPTestNet

- (void)setUp {
    [super setUp];
    // Put setup code here. This method is called before the invocation of each test method in the class.
}

- (void)tearDown {
    // Put teardown code here. This method is called after the invocation of each test method in the class.
    [super tearDown];
}

- (void)testExample {
    // This is an example of a functional test case.
    XCTAssert(YES, @"Pass");
}

- (void)testPerformanceExample {
    // This is an example of a performance test case.
    [self measureBlock:^{
        // Put the code you want to measure the time of here.
    }];
}

- (void)testqueryString {
    
    CPNetwork *net = [[CPNetwork alloc] init];
    NSDictionary *dic = nil;
    
    NSString *string = [net queryString:dic];
    XCTAssertEqualObjects(string, nil);
    
}


- (void)testrequest{
    
    CPNetwork *net = [[CPNetwork alloc] init];
    [net requestJSON:@"http://c.m.163.com/nc/article/headline/T1348647853363/0-20.html" httpMethod:HTTPMethodGet parameter:nil completionHandler:^(id JSONOBJ, NSError *error) {
       
        NSLog(@"%@",JSONOBJ);
        
        
    }];
    
    
}


@end
